<?php  include $this->admin_tpl('header'); ?>
<script src="<?php echo JS_PATH;?>layer/layer.js"></script>
<div >
    <dl>
        <dd>
            <form name="form" method="post" action="<?php echo U('Site/calendar') ?>">
                <ul class="web">
                    <li>
                        <strong>当日价格:</strong>
                       <input type="text" class="text_input" name="price" />
                    </li>

                    <li>
                        <strong>当日最低价格:</strong>
                       <input type="text" class="text_input" name="minprice" />
                    </li>

                  <li>
                        <strong>当日最高价格:</strong>
                       <input type="text" class="text_input" name="maxprice" />
                    </li>

                </ul>
                <div class="input1"><input type="button" value="提交" class="button_search"></div>
                <input type="hidden" name="date" value="<?php echo $_GET['date'];?>" />
            </form>
        </dd>
    </dl>
</div>
<script type="text/javascript">
$(function(){
    $('.button_search').click(function(){
        var date = $('input[name="date"]').val();
        var price = $('input[name="price"]').val();
        var minprice = $('input[name="minprice"]').val();
        var maxprice = $('input[name="maxprice"]').val();
        $.ajax({
           type: "post",
           url: "<?php U('Site/calendar') ?>",
           data: {
                date:date,
                price,price,
                minprice,minprice,
                maxprice,maxprice
           },
           dataType:'json',
           success: function(ret){
                if(parseInt(ret.status)){
                    layer.alert(ret.info, function(i){
                        /*layer.close(i);
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index);*/
                        parent.location.reload();
                    })
                } else {
                    layer.alert(ret.info);
                }
           }
        });
    })
})
</script>
<?php include $this->admin_tpl('copyright') ?>